<?php
$this->pageTitle = Yii::app()->name . " - $label";

$breadcrumbs = array(
	'homeLink'=>false,
	'htmlOptions'=>array('class'=>'byline'),
	'links'=>Path::createBreadcrumbsLinks($path),
);
?>

<h1><?php echo $label; ?></h1>

<?php
$this->widget('zii.widgets.CBreadcrumbs', $breadcrumbs);

$view = 'application.views';

$data = array(
	'type'=>$type,
	'path'=>$path,
	'target'=>'index',
	'label'=>'Lokasi',
);
$this->renderPartial("$view.folder._nav", $data);

$root = Yii::app()->params['file'];
$model = new Folder("$root/$type/$path");

//if ($withFolder) {
//	foreach ($model->folders as $folder) {
//		$data = array(
//			'name'=>$name,
//			'path'=>$path,
//			'data'=>$folder,
//		);
//		echo $this->renderPartial("$view._folder", $data);
//	}
//}

echo '<p />';

if ($mode == PathController::MODE_DETAIL) {
	foreach ($model->files as $file) {
		$data = array(
			'type'=>$type,
			'path'=>$path,
			'data'=>$file,
		);
		echo $this->renderPartial("$view.file._view", $data);
	}
} else {
	$data = array(
		'type'=>$type,
		'path'=>$path,
	);
	$this->renderPartial("$view.file._thumbs", $data);
}
?>
